﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package net.wooga.pets.controllers {
    import net.wooga.pets.events.*;
    import net.wooga.pets.models.*;
    import net.wooga.pets.constants.*;
    import org.robotlegs.mvcs.*;

    public class CheckForSurprisePackagesCommand extends Command {

		[Inject]
        public var sessionModel:SessionModel;

        override public function execute():void{
            var _local1:Object;
            for each (_local1 in this.sessionModel.surprisePackages) {
                dispatch(new InfoEvent(EventConstants.CREATE_POPUP, GameConstants.GOT_GIFT_POPUP, _local1));
            };
        }
        private function createTestData():void{
            var _local1:Array = [];
            var _local2:Object = {sender:100001916679562, rewards:["ice", "love", "star", "ice"]};
            _local1.push(_local2);
            this.sessionModel.surprisePackages = _local1;
        }

    }
}//package net.wooga.pets.controllers 
